﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace Zzw
{
    public static class ColorHelper
    {
        /// <summary>
        /// 转成#FF0000格式，可用于Html的颜色设置
        /// </summary>
        /// <param name="color"></param>
        /// <returns></returns>
        public static string ToHtmlColor(this System.Drawing.Color color)
        {
            return string.Format("#{0:X2}{1:X2}{2:X2}", color.R, color.G, color.B);
        }
    }
}